package observer;

/**
 * 新闻观察者
 *
 * @author Koizumi Sinya
 * @date 2018/03/19. 21:36
 * @edithor
 * @date
 */
public class NewsObserver implements Observer {
    private String name;

    public NewsObserver(String name) {
        this.name = name;
    }

    @Override
    public void update(String message) {
        System.out.println(name + "接收到新消息：" + message);
    }
}
